<!--
 * @Description: 第二十四章（兄弟组件传参和Bus） 使用Event bus
 * @Author: IA ia@kepro.space
 * @Date: 2025-02-18 16:07:26
-->
<template>
  <div>
    <h1>我是B组件</h1>
    <div class="B">Flag: {{ Flag }}</div>
  </div>
</template>
<script setup lang="ts">
import Bus from '../../Bus'
import { ref } from 'vue'
let Flag = ref<boolean>(false)
Bus.on('shijian', (flag: boolean) => {
  Flag.value = flag
})
</script>
<style scoped>
h1,
h2,
hr {
  margin: 10px 0;
}

.B {
  width: 200px;
  height: 200px;
  color: #fff;
  background-color: red;
}
</style>
